import java.util.Arrays;
import java.util.Scanner;
public class java20 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int[] numbers = new int[5];
        for (int i = 0; i < 5; ++i) {
            System.out.print("请输入第" + (i + 1) + "个数: ");
            numbers[i] = in.nextInt();
        }
        int tmp = 0;
        for (int i = 0; i < numbers.length - 1; ++i) {
            for (int j = 0; j < numbers.length - i - 1; ++j) {
                if (numbers[j] > numbers[j + 1]) {
                    tmp = numbers[j];
                    numbers[j] = numbers[j + 1];
                    numbers[j + 1] = tmp;
                }
            }
        }
        System.out.println("排序后的数组为: " + Arrays.toString(numbers));
    }
}